package com.link.base.base.product.service;

import com.link.base.base.product.model.Price;
import com.link.base.base.product.model.Product;
import com.link.core.basic.query.QueryParams;
import com.link.core.basic.service.BasicServiceException;

import java.util.List;
import java.util.Map;

/**
 * @author unknown
 * @date unknown
 * @comments 价格操作服务
 */
public interface PriceService {

    /**
     * 根据价格列表
     *
     * @param qps
     * @return
     * @throws BasicServiceException
     */
    public List<Price> queryPriceListPage(QueryParams qps) throws BasicServiceException;

    /**
     * 添加价格:添加价格
     *
     * @param record
     * @throws BasicServiceException
     */
    public void addPriceInsert(Price record) throws BasicServiceException;

    /**
     * 修改价格:修改价格
     *
     * @param record
     * @throws BasicServiceException
     */
    public void priceUpdate(Price record) throws BasicServiceException;

    /**
     * 删除价格:删除价格
     *
     * @param record
     * @throws BasicServiceException
     */
    public void delPriceById(Price record) throws BasicServiceException;

    /**
     * app迁移
     * 查询价格接口
     * @param record
     * @return 价格列表
     * @throws Exception
     */
    public List<Price> queryPrice(Price record) throws Exception;

    /**
     * app迁移
     * 默认根据客户Id查询客户价格列表
     * @param record
     * @return Map
     * @throws Exception
     */
    public Map<Long, Price> queryPriceMap(Price record) throws Exception;

    /**
     * app迁移
     * 根据产品列表重新计算产品价格
     * @param list
     * @return 价格列表
     * @throws Exception
     */
    public List<Product> reCalculateProductsPrice(List<Product> list) throws Exception;
}
